#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2025/6/18 14:31
# @Author  : Chenmm
# @File    : redis.py
# @Software: PyCharm

from aioredis import Redis, create_redis_pool
from settings.config import REDIS_CONFIG


async def create_redis() -> Redis:
    return await create_redis_pool(f"redis://{REDIS_CONFIG['host']}:{REDIS_CONFIG['port']}", db=REDIS_CONFIG['db'], password=None, encoding="utf-8")

